import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

public class CSV {

	private String zeile;
	private ArrayList list = new ArrayList();
	private String[] split = null;
		
	public static void main(String[] args) {
		CSV c = new CSV();
		c.readData();
		c.printData();
	}
	
	public void readData() {
		try {
				FileReader file = new FileReader("20Mhz_MIMO_iperf_tcp.csv");
				BufferedReader data = new BufferedReader(file);
				while ((zeile = data.readLine()) != null) {
					split = zeile.split(";");
					for(int i=0; i<split.length; i++) {
						//leere Zeilen ignorieren
						if( !(split[i].equals("")) )
						//eventuelle Leerzeichen zwischen zwei ';' entfernen 
						//und Wert in Liste schreiben
						list.add(split[i].trim());
					}
				}
		} catch (FileNotFoundException e) {
			System.out.println("Datei nicht gefunden");
		} catch (IOException e) {
			System.out.println("E/A-Fehler");
		}
	}
	
	public void printData() {
		int max = list.size();
        for(int i=0; i<max; i++) {
			System.out.println(list.get(i));
        }
	}
}